package top.yaofengqiao.springcloudsimple.demo.biz.domain.order.service;

import top.yaofengqiao.springcloudsimple.demo.biz.domain.order.model.entity.OrderEntity;
import top.yaofengqiao.springcloudsimple.demo.biz.trigger.http.app.dto.CreateOrderDTO;
import top.yaofengqiao.springcloudsimple.demo.biz.trigger.listener.dto.OrderDeliverDTO;

/**
 * @author yfq
 * @date 2024/6/14 11:34
 * @description
 */
public interface IOrderService {
    /**
     * 创建订单
     *
     * @param createOrderDTO ...
     * @param userId         ...
     * @return 订单id
     */
    Long createOrder(CreateOrderDTO createOrderDTO, long userId);

    /**
     * 查询订单详情
     *
     * @param orderNo ...
     * @return ...
     */
    OrderEntity queryByOrderNo(String orderNo);

    /**
     * 查询订单详情
     *
     * @param orderId ...
     * @return ...
     */
    OrderEntity queryByOrderId(long orderId);

    /**
     * 订单发货
     *
     * @param orderDeliverDTO ...
     */
    void orderDeliver(OrderDeliverDTO orderDeliverDTO);

    /**
     * 订单关闭
     *
     * @param rechargeOrderNo ...
     */
    void orderClose(String rechargeOrderNo);
}
